home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Sample Code / Mixed Bag / Sample Components / SampleCode.r < prev    next >
Encoding:
Text File  |  1992-10-22  |  2.6 KB  |  209 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SampleCode.r
  3.  
  4.     Written by:    Peter Hoddie
  5.  
  6.     Copyright:    © 1992 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10. #include "Types.r"
  11.  
  12. #define SystemSevenOrLater
  13.  
  14. type 'thng' {
  15.     hex longint    type;
  16.     hex longint    subType;
  17.     hex longint    manufacturer;
  18.     hex    longint    flags;
  19.     hex    longint flagsMask;
  20.     hex longint    thingResType;    
  21.     int thingResID;
  22.     hex longint  thingNameResType;
  23.     int thingNameResID;
  24.     hex longint  thingInfoResType;
  25.     int thingInfoResID;
  26.     hex longint  thingIconResType;
  27.     int thingIconResID;
  28. };
  29.  
  30. #define    canMovieImportHandles 1
  31. #define    canMovieImportFiles 2
  32. #define    hasMovieImportUserInterface 4
  33. #define    canMovieExportHandles 8
  34. #define    canMovieExportFiles 16
  35. #define    hasMovieExportUserInterface 32
  36. #define    dontAutoFileMovieImport 64
  37.  
  38. #define mediaHandlerFlagBaseClient 1
  39.  
  40. #define pnotComponentWantsEvents 1
  41. #define pnotComponentNeedsNoCache 2
  42.  
  43.  
  44. resource 'thng' (128,  "Pict Media Handler") {
  45.     'mhlr',
  46.     'PICT',
  47.     'appl',
  48.     mediaHandlerFlagBaseClient,
  49.     0,
  50.     'mhlr',
  51.     128,
  52.     'STR ',
  53.     128,
  54.     'STR ',
  55.     228,
  56.     0,
  57.     0
  58. };
  59.  
  60. resource 'STR ' (128) {
  61.     "PICT Media Handler"
  62. };
  63.  
  64. resource 'STR ' (228) {
  65.     "Plays PICTs in QuickTime movies"
  66. };
  67.  
  68. resource 'thng' (129,  "SGChannel Pict") {
  69.     'sgch',
  70.     'PICT',
  71.     'appl',
  72.     0,
  73.     0,
  74.     'sgch',
  75.     128,
  76.     'STR ',
  77.     129,
  78.     'STR ',
  79.     229,
  80.     0,
  81.     0
  82. };
  83.  
  84. resource 'STR ' (129) {
  85.     "SGChannel PICT"
  86. };
  87.  
  88. resource 'STR ' (229) {
  89.     "Captures PICTs from screen into QuickTime movies"
  90. };
  91.  
  92. resource 'thng' (130,  "SGPictPanel") {
  93.     'sgpn',
  94.     'PICT',
  95.     'thng',
  96.     0,
  97.     0,
  98.     'sgpn',
  99.     128,
  100.     'STR ',
  101.     130,
  102.     'STR ',
  103.     230,
  104.     0,
  105.     0
  106. };
  107.  
  108. resource 'STR ' (130) {
  109.     "Settings"
  110. };
  111.  
  112. resource 'STR ' (230) {
  113.     "Configure PICT capture channel"
  114. };
  115.  
  116. resource 'thng' (131,  "Export PICS") {
  117.     'spit',
  118.     'PICS',
  119.     0,
  120.     canMovieExportFiles,
  121.     0,
  122.     'eat ',
  123.     128,
  124.     'STR ',
  125.     131,
  126.     'STR ',
  127.     231,
  128.     0,
  129.     0
  130. };
  131.  
  132. resource 'STR ' (131) {
  133.     "PICS"
  134. };
  135.  
  136. resource 'STR ' (231) {
  137.     "Exports QuickTime movies as PICS files"
  138. };
  139.  
  140. resource 'thng' (132,  "ImportScrapbook") {
  141.     'eat ',
  142.     'scbk',
  143.     'PICT',
  144.     canMovieImportFiles,
  145.     0,
  146.     'eat ',
  147.     129,
  148.     'STR ',
  149.     132,
  150.     'STR ',
  151.     232,
  152.     0,
  153.     0
  154. };
  155.  
  156. resource 'STR ' (132) {
  157.     "Scrapbook"
  158. };
  159.  
  160. resource 'STR ' (232) {
  161.     "Import Scrapbook files into QuickTime movies"
  162. };
  163.  
  164. resource 'thng' (133,  "PreviewPICS") {
  165.     'pnot',
  166.     'PICS',
  167.     'appl',
  168.     pnotComponentNeedsNoCache,
  169.     0,
  170.     'pnot',
  171.     128,
  172.     'STR ',
  173.     133,
  174.     'STR ',
  175.     233,
  176.     0,
  177.     0
  178. };
  179.  
  180. resource 'STR ' (133) {
  181.     "Preview PICS"
  182. };
  183.  
  184. resource 'STR ' (233) {
  185.     "Preview PICS files"
  186. };
  187.  
  188. resource 'DITL' (7000, "Pict Channel Panel") {
  189.     {    /* array DITLarray: 1 elements */
  190.         /* [1] */
  191.         {4, 6, 90, 143},
  192.         UserItem {
  193.             disabled
  194.         }
  195.     }
  196. };
  197.  
  198. resource 'DITL' (7001, "Pict Panel") {
  199.     {    /* array DITLarray: 1 elements */
  200.         /* [1] */
  201.         {11, 15, 31, 132},
  202.         CheckBox {
  203.             enabled,
  204.             "Capture Ticks"
  205.         }
  206.     }
  207. };
  208.  
  209.